<?php
class MainController extends AppController {

	var $name = 'Main';

	var $helpers = array('Html', 'Session');

	var $uses = array();
	
	function display() {
		$this->layout='desktop';
		$this->set('title_for_layout', 'CakeX');
		$this->set('loggedUser', json_encode($this->Auth->user()));
	}
	
	function login() {
		$this->Auth->logout();
		
		$this->layout='login';
		$this->set('title_for_layout', 'CakeX - Autenticação');	
	}
}
